package com.relax.t1;

public class Thread1 extends Thread {
    public Thread1(String name) {
        super(name);
    }

    @Override
    public void run() {
        while (true) {
            System.out.println(getName() + "111");
            try {
                sleep(200);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }

    public static void main(String[] args) throws InterruptedException {
        Thread1 t1 = new Thread1("aaa");
        Thread1 t2 = new Thread1("bbb");
        t1.start();
        t2.start();

        t1.interrupt();
    }
}
